#define  _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<assert.h>
char* my_strncat(char* dest, const char* src,size_t num)
{
	assert(dest && src);
	size_t n = num -1;
	char* str = dest;
	while (*dest)
	{
		dest++;
	}
	while ((*dest++ = *src++)&&n--)
	{
		;
	}
	*dest = '\0';
	return str;
}


int main()
{
	char arr1[200] = "abcd";
	char arr2[] = "efgh";
	char* str = my_strncat(arr1, arr2, 4);
	printf("%s", str);
	
}